<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>文档管理</title>
<link rel="stylesheet" type="text/css" href="../img/base.css">
</head>
<body leftmargin="8" topmargin="8" background='../img/allbg.gif'>
        <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" align="center">
            <tr>
		<td align='center' valign='top'>
                    <table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#D1DDAA">
                        <tr>
                            <td height="26" background="../img/newlinebg3.gif">
                                <table width="98%" border="0" cellspacing="0" cellpadding="0">
                                    <tr>
                                        <td align="right">
                                                <input type='button' class="coolbg np" onClick="location='consulting_info.php?action=add';" value='添加咨询' />
                                        </td>
                                    </tr>
                                </table>
                            </td>
                       </tr>
                    </table>
			
                    <table width="100%" border="0" cellpadding="0" cellspacing="0">
                            <tr bgcolor="#FFFFFF">
                             <td height="4"></td>
                           </tr>
                    </table>
                
                     <table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#D1DDAA">
                          <tr>
                               <td height="26" background="../img/tbg.gif">
                                  <form action="" method="post">
                                        <table width="98%" border="0" cellspacing="2" cellpadding="0">
                                                <tr>
                                                      <td  colspan="4" align="center">
                                                          咨询产品：<input type='text' name='product_name' id="product_name" value="<{$product_name}>" />
                                                                 <input type="hidden" name="op" value="search" />
                                                                 <input type='submit' class="coolbg np" value='搜索' />
                                                      </td>
                                               </tr> 
                                        </table>
                                    </form>
                              </td>
                         </tr>
                     </table>
            
                    <table width="100%" border="0" cellpadding="0" cellspacing="0">
                        <tr bgcolor="#FFFFFF">
                            <td height="4"></td>
                        </tr>
                    </table>

                    <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D1DDAA">
                        <tr bgcolor="#E7E7E7">
                            <td height="24" align="left" colspan="9" background="../img/tbg.gif">
                                §咨询 &gt; 咨询管理&nbsp;
                            </td>
                        </tr>
                        <tr align="center" bgcolor="#FAFAF1" height="22">
                            <td width="6%">ID</td>
							<td width="8%">咨询产品</td>
                            <td width="8%">状态</td>
							<td width="8%">添加人</td>
							<td width="8%">添加时间</td>	
                            <td width="10%">操作</td>
                        </tr>
                        <{foreach item=list from=$consulting_list}>
                            <tr align='center' bgcolor="#FFFFFF"  onMouseMove="javascript:this.bgColor='#f4fbf4';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22">
                                 <td align='left'>&nbsp;&nbsp;<{$list.consulting_id}></td>
                                 <td align='left'>&nbsp;&nbsp;<a href="../product/product_info.php?action=edit&product_id=<{$list.product_id}>"><{$list.product_name}></a></td>
								 <{if $list.status eq  1}>
									<td align='left'>&nbsp;&nbsp;未回复</td>
								<{else if $list.status eq 2}>
									<td align='left'>&nbsp;&nbsp;已回复</td>
								<{else}>
									<td align='left'>&nbsp;&nbsp;已屏蔽</td>
								<{/if}>								
                                <td align='left'>&nbsp;&nbsp;<{$list.add_user}></td>
                                <td align='left'>&nbsp;&nbsp;<{$list.consulting_addtime|date_format:"%Y-%m-%d %H:%M"}></td>
                                <td>
									<{if $list.status eq 1}>
										<a href="consulting_reply_info.php?action=anser&consulting_id=<{$list.consulting_id}>">回复</a> |
									<{else if $list.status eq 2}>
										<a href="consulting_reply_info.php?action=check&consulting_id=<{$list.consulting_id}>">查看回复</a> |
									<{/if}>
									<a href="consulting_info.php?action=edit&consulting_id=<{$list.consulting_id}>">编辑</a> |
									<a href="javascript:del(<{$list.consulting_id}>)">删除</a>
                                </td>
                            </tr>
                        <{/foreach}>                
                        <tr bgcolor="#FAFAF1">
                            <td height="24" colspan="12">&nbsp;&nbsp;<{$page_str}></td>
                        </tr>
                    </table>

                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                            <td height="4"></td>
                        </tr>
                        <tr bgcolor="#FFFFFF">
                                <td height="26"></td>
                        </tr>
                        <tr>
                                <td colspan="2" height="4"></td>
                        </tr>
                    </table>
                </td>
            </tr>
     </table>
</body>
</html>
<script>
function del(id)
{
	if(id == 0)
	{
		alert("请选择咨询！");
		return false;
	}
	if (confirm("是否删分类？\n\n确定->删除\n\n取消->不删除"))
	{
		location = "consulting_act.php?action=del&consulting_id="+id;
	}
}
</script>